blob: f9b31211f5455ded65a0ba10fa0c188f7df832fb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import { post } from '$lib/utils';
const username = 'bob',
network = 'lightning';
export async function GET({ params }) {
let { amount } = params;
console.log('AMT', amount);
let { text } = await post('/lightning/invoice', { amount });
console.log('TXT', text);
await post('/invoice', { invoice: { text, network }, user: { username } });
return { body: { amount, text } };
}
|